#ifndef __DATA_TABLE_HH__
#define __DATA_TABLE_HH__

class DataColumn
{
 public:
  DynType* col_dyntype;
  DynObject dflt;
  vector<DynObject> col_cells;
};

class TicVector
{
 public:
  virtual void add_tic(const DynObject&, size_t data_index) = 0;
};

class SortedTicVector : public TicVector
{
 public:
  DictSortedVector tics;
  void add_tic(const DynObject&, size_t data_index);
};

class DataTable
{
 public:
  TicVector* row_tics;
  TicVector* col_tics;
  vector<DataColumn> cols;

  void add_col(const DynObject& col_tic_name, 
	       DynType* col_dyntype, const DynObject& cell_dflt_value);
  void add_col(const DynObject& col_tic_name, DynType* col_dyntype);
  void add_row(const DynObject& row_tic);

  bool has_row_tic(const DynObject& row_tic) const;
  bool has_col_tic(const DynObject& col_tic) const;
  void set_value(const DynObject& row_tic,
		 const DynObject& col_tic,
		 const DynObject& value);
  DynObject get_value(const DynObject& row_tic,
		      const DynObject& col_tic) const;
};

#endif
